import numpy as np
from torch.utils.tensorboard import SummaryWriter
from PIL import Image
writer = SummaryWriter("../logs")

img_path = "../data/BEES_ANTS/train/bees/16838648_415acd9e3f.jpg"
img_pil = Image.open(img_path)
img_array = np.array(img_pil)
print(img_array.shape)

writer.add_image("img", img_array, 1, dataformats="HWC")

img_path = "../data/BEES_ANTS/train/bees/39747887_42df2855ee.jpg"
img_pil = Image.open(img_path)
img_array = np.array(img_pil)
print(img_array.shape)

writer.add_image("img", img_array, 2, dataformats="HWC")

for i in range(100):
    writer.add_scalar("y = x ", i, i)

writer.close()
